package com.eorchis.module.trainingneeds.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.eorchis.core.basedao.entity.impl.AbstractBaseEntity;


import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;

/**
 * Title: QuestionBank<br>
 * Description: 培训需求题库选项表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author HuangTF
 * @createDate 2014-02-07
 * @version $Revision$
 */
@Entity
@Table(name = "QUESTION_BANK_OPTION")
public class QuestionBankOption extends AbstractBaseEntity implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String optionId;//选项ID
	private QuestionBank questionBank;//试题
	private String optionName;//选项名称
	private String optionNum;//选项编号
	private Integer objectiveTopic;//多选题是否为客观题1:是     除1之外全部为否
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="OPTION_ID")
	/**
	 * 获取选项ID
	 */		
	public String getOptionId() {
		return optionId;
	}
	/**
	 * 设置选项ID
	 */		
	public void setOptionId(String optionId) {
		this.optionId = optionId;
	}
	/**
	 * 获取试题
	 */		
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name="QUESTION_ID")
	public QuestionBank getQuestionBank() {
		return questionBank;
	}
	/**
	 * 设置试题
	 */		
	public void setQuestionBank(QuestionBank questionBank) {
		this.questionBank = questionBank;
	}
	
	/**
	 * 获取选项名称
	 */		
	@Column(name="OPTION_NAME")
	public String getOptionName() {
		return optionName;
	}
	/**
	 * 设置选项名称
	 */
	public void setOptionName(String optionName) {
		this.optionName = optionName;
	}
	
	/**
	 * 获取试题编号
	 */		
	@Column(name="OPTION_NUM")
	public String getOptionNum() {
		return optionNum;
	}
	/**
	 * 设置试题编号
	 */		
	public void setOptionNum(String optionNum) {
		this.optionNum = optionNum;
	}
	
	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "";
	}
	
	/**
	 * 获取多选题答案是否为客观题
	 */	
	@Column(name="OBJECTIVE_TOPIC")
	public Integer getObjectiveTopic() {
		return objectiveTopic;
	}
	/**
	 * 设置多选题答案是否为客观题
	 */	
	public void setObjectiveTopic(Integer objectiveTopic) {
		this.objectiveTopic = objectiveTopic;
	}
}
